from launch import LaunchDescription
from launch_ros.actions import Node
from ament_index_python.packages import get_package_share_directory
import os

def generate_launch_description():
    config_dir = os.path.join(
        get_package_share_directory('stm32_robot'),
        'config'
    )
    params_file = os.path.join(config_dir, 'params.yaml')
    
    return LaunchDescription([
        Node(
            package='stm32_robot',
            executable='stm32_robot_node',
            name='stm32_robot_node',
            parameters=[params_file],
            output='screen'
        ),
    ])